From dae75267fdddb37833f994902949c25d9581ea43 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Sun, 15 Oct 2006 09:19:26 +0100 Subject: [PATCH] [XEND] Check for and fail on non-existent floppy-drive file when starting HVM guest. The qemu device model hangs when a non-existent floppy file is passed via 'fda' or 'fdb'. The attached patch checks whether the floppy file exists and raises an error if it does not. Signed-off-by: Stefan Berger --- tools/python/xen/xend/image.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index 28a8952eec..fe416e2ba5 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -312,6 +312,11 @@ class HVMImageHandler(ImageHandler): if v: ret.append("-%s" % a) ret.append("%s" % v) + + if a in ['fda', 'fdb' ]: + if v: + if not os.path.isfile(v): + raise VmError("Floppy file %s does not exist." % v) log.debug("args: %s, val: %s" % (a,v)) # Handle disk/network related options -- 2.30.2